package com.daily.daily_push;

import java.nio.file.Path;
import java.nio.file.Paths;

public class testtest {
    public static void main(String[] args) {

        String filePath = "/home/poi-tl/app/v1/test.yaml";

        Path path = Paths.get(filePath);
        Path parentPath = path.getParent();
        Path grandParentPath = parentPath.getParent();

        String parentDirectory = parentPath.toAbsolutePath().toString().replace("\\", "/");
        String grandParentDirectory = grandParentPath.toAbsolutePath().toString().replace("\\", "/");

        System.out.println("Parent directory: " + parentDirectory);
        System.out.println("Grandparent directory: " + grandParentDirectory);
    }
    private static  String ifServiceType(Integer type) {
        return type == 1 ? "NodePort" : (type == 2 ? "NodePort" : (type == 3 ? "Headless" : (type == 4 ? "LoadBalancer" : "")));

    }



}
